x11: Use g_object_(un)ref instead of gdk_cursor_(un)ref
authorBenjamin Otte <otte@redhat.com>
Mon, 20 Dec 2010 02:12:33 +0000 (03:12 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 21 Dec 2010 17:07:04 +0000 (12:07 -0500)
gdk/x11/gdkcursor-x11.c
gdk/x11/gdkwindow-x11.c

index b5bf69cecaa4ccd0d9ad5b7f5ac0a1cca9e9ff25..efbc96f16922ecf174b1222a3168a7c4e4aff80b 100644 (file)
@@ -98,7 +98,7 @@ add_to_cache (GdkX11Cursor* cursor)
   cursor_cache = g_slist_prepend (cursor_cache, cursor);
 
   /* Take a ref so that if the caller frees it we still have it */
-  gdk_cursor_ref ((GdkCursor*) cursor);
+  g_object_ref (cursor);
 }
 
 /* Returns 0 on a match
@@ -261,7 +261,7 @@ _gdk_x11_display_get_cursor_for_type (GdkDisplay    *display,
       if (private)
         {
           /* Cache had it, add a ref for this user */
-          gdk_cursor_ref ((GdkCursor*) private);
+          g_object_ref (private);
 
           return (GdkCursor*) private;
         }
@@ -671,7 +671,7 @@ _gdk_x11_display_get_cursor_for_name (GdkDisplay  *display,
       if (private)
         {
           /* Cache had it, add a ref for this user */
-          gdk_cursor_ref ((GdkCursor*) private);
+          g_object_ref (private);
 
           return (GdkCursor*) private;
         }
index 7c299c9ce01400365da367e86358e94ddec18bcf..4f99b027f57e78b981963e8ac7d7c8e10e1dc8ed 100644 (file)
@@ -134,8 +134,8 @@ static void
 gdk_window_impl_x11_init (GdkWindowImplX11 *impl)
 {  
   impl->toplevel_window_type = -1;
-  impl->device_cursor = g_hash_table_new_full (NULL, NULL, NULL,
-                                               (GDestroyNotify) gdk_cursor_unref);
+  impl->device_cursor = g_hash_table_new_full (NULL, NULL,
+                                               NULL, g_object_unref);
 }
 
 GdkToplevelX11 *
@@ -2509,7 +2509,7 @@ gdk_window_x11_set_device_cursor (GdkWindow *window,
     {
       _gdk_x11_cursor_update_theme (cursor);
       g_hash_table_replace (impl->device_cursor,
-                            device, gdk_cursor_ref (cursor));
+                            device, g_object_ref (cursor));
     }
 
   if (!GDK_WINDOW_DESTROYED (window))